package com.example.campusforumapi.dao;

import com.example.campusforumapi.entity.ActivityPartin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityPartMapper {

    List<ActivityPartin> list(Integer userId, Integer activityId, String status);

    int delActPart(List<Integer> userIds, List<Integer> activityIds);

    @Select("select count(*) from user where user_id = #{userId}")
    int findsameUserId(Integer userId);

    @Select("select count(*) from activity where activity_id = #{activityId}")
    int findsameActivityId(Integer activityId);

    int insertActPart(ActivityPartin activityPartin);
}
